import { DeptDtoList } from './model/deptModel';

import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  GetAll = '/dept/all',
}

/**
 * @description: 查询前置机数据，使用body传入查询条件
 */
export function getAllDepts(mode: ErrorMessageMode = 'modal') {
  return defHttp.get<DeptDtoList>(
    {
      url: Api.GetAll,
    },
    {
      errorMessageMode: mode,
      isQuChengGatewayUnifyFormat: false,
    },
  );
}
